<?php

error_reporting(E_ALL);

/**
 * ConexionBD - class.funcLogin.php
 *
 * $Id$
 *
 * This file is part of ConexionBD.
 *
 * Automatically generated on 29.12.2009, 16:39:27 with ArgoUML PHP module 
 * (last revised $Date: 2008-04-19 08:22:08 +0200 (Sat, 19 Apr 2008) $)
 *
 * @author Miguel Angel Chavez
 */

if (0 > version_compare(PHP_VERSION, '5')) {
    die('This file was generated for PHP 5');
}

/**
 * include ConexionBD
 *
 * @author Miguel Angel Chavez Obregon
 * @see Funcion con operativas basicas a la base de datos, cualquier metodo que se requiera hacer que no sea directo a la base de datos debera crear una clase que haga extend a esta.
 * @version 1.0
 */
require_once('class.ConexionBD.php');

/**
 * include login
 *
 * @author Miguel Angel Chavez
 */
require_once('interface.login.php');

/* user defined includes */
// section -64--88-1--47-961726b:125dbb16c92:-8000:0000000000001025-includes begin
// section -64--88-1--47-961726b:125dbb16c92:-8000:0000000000001025-includes end

/* user defined constants */
// section -64--88-1--47-961726b:125dbb16c92:-8000:0000000000001025-constants begin
// section -64--88-1--47-961726b:125dbb16c92:-8000:0000000000001025-constants end

/**
 * Short description of class funcLogin
 *
 * @access public
 * @author Miguel Angel Chavez
 */
class funcLogin
    extends ConexionBD
        implements login
{
    // --- ASSOCIATIONS ---
    // generateAssociationEnd :     // generateAssociationEnd : 

    // --- ATTRIBUTES ---

    // --- OPERATIONS ---

    /**
     * Short description of method acceso
     *
     * @access public
     * @author Miguel Angel Chavez
     * @param  int usuario
     * @param  int clave
     * @return void
     */
    public function acceso($usuario, $clave)
    {
        // section -64--88-1--47-961726b:125dbb16c92:-8000:0000000000001038 begin
        $usr=trim($usuario);
        $cve=trim($clave);
        $stp=mssql_init("SP_login",$this->link);
            mssql_bind($stp,"@usuario",$usr,SQLVARCHAR,false,false,50);
            mssql_bind($stp,"@clave2",$cve,SQLVARCHAR,false,false,255);
            $ResultSet=mssql_execute($stp);
            $fin=mssql_fetch_array($ResultSet);
            mssql_free_statement($stp);
            return $fin;

        // section -64--88-1--47-961726b:125dbb16c92:-8000:0000000000001038 end
    }

    /**
     * Short description of method salida
     *
     * @access public
     * @author Miguel Angel Chavez
     * @return void
     */
    public function salida()
    {
        // section -64--88-1--47-961726b:125dbb16c92:-8000:000000000000103C begin
        // section -64--88-1--47-961726b:125dbb16c92:-8000:000000000000103C end
    }

    /**
     * Short description of method avisos
     *
     * @access public
     * @author Miguel Angel Chavez
     * @param  int opcion
     * @return void
     */
    public function avisos($opcion)
    {
        // section -64--88-1--47-961726b:125dbb16c92:-8000:000000000000103E begin
        $stp=mssql_init("SP_avisos",$this->link);
            mssql_bind($stp,"@aviso",$opcion,SQLVARCHAR,false,false,2);
            $ResultSet=mssql_execute($stp);
            $fin=mssql_fetch_array($ResultSet, MSSQL_ASSOC);
            mssql_free_statement($stp);
            return $fin;
        // section -64--88-1--47-961726b:125dbb16c92:-8000:000000000000103E end
    }

} /* end of class funcLogin */

?>